package cn.trasen.his.poc.std.core.action;

import cn.trasen.his.poc.std.api.model.major.WardBed;
import org.springframework.stereotype.Component;
import pro.shushi.pamirs.meta.annotation.Function;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.api.session.PamirsSession;
import pro.shushi.pamirs.meta.enmu.FunctionOpenEnum;
import pro.shushi.pamirs.meta.enmu.FunctionTypeEnum;

@Component
@Model.model(WardBed.MODEL_MODEL)
public class BedCardAction {

    @Function(openLevel = FunctionOpenEnum.API)
    @Function.Advanced(type = FunctionTypeEnum.QUERY)
    public WardBed construct(WardBed data) {
        data.setInputUser(PamirsSession.getUserName());
        return data.construct();
    }
}
